package com.example.demo20230927;

import lombok.Data;

import java.util.Date;

@Data
public class Book {
    private Long id; // 图书ID
    private String title; // 书名
    private String author; // 作者
    private Date publicationDate; // 出版日期
    private Integer stockQuantity; // 库存数量

    // 构造函数
    public Book() {
    }

    // getter和setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getPublicationDate() {
        return publicationDate;
    }

    public void setPublicationDate(Date publicationDate) {
        this.publicationDate = publicationDate;
    }

    public Integer getStockQuantity() {
        return stockQuantity;
    }

    public void setStockQuantity(Integer stockQuantity) {
        this.stockQuantity = stockQuantity;
    }

    // 可以根据需要添加toString方法、equals和hashCode方法
}
